package test 
{
	import com.greensock.TweenNano;
	import flash.display.Bitmap;
	import flash.utils.getTimer;
	import lynch.net.loading.ResourceLoader;
	import starling.display.Sprite;
	
	/**
	 * ...
	 * @author 小痛
	 */
	public class LoaderTest extends Sprite 
	{
		
		public function LoaderTest() 
		{
			super();
			
			init();
			//init();
			//init();
		}
		
		private function init():void
		{
			var v:Vector.<String> = Vector.<String>([]);
			for (var i:int = 0; i < 60; i++) 
			{
				v[i] = "player/" + (i % 50) + ".jpg";
			}
			
			TweenNano.delayedCall(1, start, [v]);
			
		}
		
		private function start(v:Vector.<String>):void 
		{
			trace("start")
			var t:int = getTimer();
			ResourceLoader.loadImgs(v, onLoadedComplete);
			trace(getTimer() - t);
		}
		
		private function onLoadedComplete(arr:Array):void 
		{
			for each (var item:Bitmap in arr) 
			{
				trace(item)
			}
			trace("   ")
		}
		
	}

}